package com.example.demo4;

/**
 * 案例四：手写ArrayList集合
 */
public class Test {
    public static void main(String[] args) {
        MyArrayList<String> list = new MyArrayList<>();
        list.add("jack");
        list.add("tom");
        list.add("mike");
        list.add("lucy");
        System.out.println(list);
        System.out.println(list.size());

        System.out.println(list.remove(3));
        System.out.println(list);
        System.out.println(list.size());

        System.out.println(list.get(1));

        list.forEach(System.out::println);
    }
}
